package com.self.smallma.myblogweb.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import lombok.Data;
import org.springframework.validation.annotation.Validated;

/**
 * 
 * 
 * @author mahuanyu
 * @email 1914096395@qq.com
 * @date 2021-07-17 17:48:05
 */
@Data
@TableName("t_message")
public class MessageEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
	@TableId
	private Long id;
	/**
	 * 昵称
	 */
	private String nickname;
	/**
	 * 邮箱
	 */
	private String email;
	/**
	 * 评论
	 */
	private String content;
	/**
	 * 头像
	 */
	private String avatar;
	/**
	 * 创建时间
	 */
	private Date createTime;
	/**
	 * 父评论id
	 */
	private Long parentMessageId;
	/**
	 * 管理员id
	 */
	private Integer adminMessage;


	//回复评论
	@TableField(exist = false)
	private List<MessageEntity> replyMessages = new ArrayList<>();
	@TableField(exist = false)
	private MessageEntity parentMessage;
	@TableField(exist = false)
	private String parentNickname;

}
